﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace TfsBugger.Util.Ui
{
    public class UiWaitScope : IDisposable
    {
        #region Ctor
        public UiWaitScope(Control host)
        {
            m_host = host;
            m_host.Cursor = Cursors.Wait;
        }
        #endregion


        #region Fields
        private Control m_host;
        #endregion


        #region IDisposable Members
        public void Dispose()
        {
            m_host.Cursor = Cursors.Arrow;
        }
        #endregion
    }
}
